package com.wl4837;

// 具体访问者 - 显示部件信息
class ComputerPartDisplayVisitor implements ComputerPartVisitor {
    @Override
    public void visit(Computer computer) {
        System.out.println("显示计算机");
    }

    @Override
    public void visit(Mouse mouse) {
        System.out.println("显示鼠标");
    }

    @Override
    public void visit(Keyboard keyboard) {
        System.out.println("显示键盘");
    }

    @Override
    public void visit(Monitor monitor) {
        System.out.println("显示显示器");
    }
}